package pqt;

import java.awt.EventQueue;

import javax.swing.JFrame;
import java.awt.BorderLayout;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridLayout;

import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import java.awt.GridBagLayout;
import javax.swing.JButton;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import javax.swing.UIManager;
import java.awt.Font;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JMenuBar;

public class AutoSize {

	private JFrame frame;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					AutoSize window = new AutoSize();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public AutoSize() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setBounds(100, 100, 609, 421);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(new BorderLayout(10, 10));
		
		JPanel izquierda = new JPanel();
		
		izquierda.setBackground(Color.WHITE);
		izquierda.setPreferredSize(new Dimension(200, 600));
		izquierda.setMaximumSize(new Dimension(200, 600));
		frame.getContentPane().add(izquierda, BorderLayout.WEST);
		izquierda.setLayout(new BorderLayout(0, 0));
		
		JScrollPane scrollPane = new JScrollPane();
		izquierda.add(scrollPane, BorderLayout.CENTER);
		
		JPanel derecha = new JPanel();
		
		derecha.setBackground(Color.WHITE);
		derecha.setPreferredSize(new Dimension(200, 600));
		derecha.setMaximumSize(new Dimension(200, 600));
		frame.getContentPane().add(derecha, BorderLayout.EAST);
		derecha.setLayout(new GridLayout(6, 0, 0, 2));
		
		JButton btnNewButton_1 = new JButton("New button");
		derecha.add(btnNewButton_1);
		
		JButton btnNewButton = new JButton("New button");
		derecha.add(btnNewButton);
		
		JPanel centro = new JPanel();
		centro.setBackground(Color.DARK_GRAY);
		frame.getContentPane().add(centro, BorderLayout.CENTER);
		centro.setLayout(new BorderLayout(0, 0));
		
		JPanel titulo = new JPanel();
		FlowLayout fl_titulo = (FlowLayout) titulo.getLayout();
		fl_titulo.setVgap(30);
		centro.add(titulo, BorderLayout.NORTH);
		
		JPanel centroEnsayos = new JPanel();
		centroEnsayos.setBackground(Color.PINK);
		centro.add(centroEnsayos, BorderLayout.CENTER);
		centroEnsayos.setLayout(new BorderLayout(0, 0));
		
		JMenuBar menuBar = new JMenuBar();
		frame.setJMenuBar(menuBar);
	}
}
